package com.canaan.business.common.enums.invoice;

/**
 * 退货类型
 */
public enum PurchaseReturnBillReturnTypeEnum {

    WAIT_INSPECTION(1, "待检区退货"),
    INSPECTION(3, "已检区退货"),
    ;

    private final Integer code;
    private final String message;

    PurchaseReturnBillReturnTypeEnum(Integer code, String info)
    {
        this.code = code;
        this.message = info;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    public static String getMessageByCode(Integer code){
        if(code == null){
            return null;
        }
        String message = null;
        for (PurchaseReturnBillReturnTypeEnum value : values()) {
            if(value.getCode().equals(code)){
                message = value.getMessage();
                break;
            }
        }
        return message;
    }
}
